<?php
/*
 * Squelette : dist/plan.html
 * Date :      Wed, 20 Sep 2006 11:46:20 GMT
 * Compile :   Tue, 21 Nov 2006 02:23:07 GMT (0.06s)
 * Boucles :   _breves, _sites, _articles_racine, _articles, _sous_rubriques, _rubriques, _secteurs
 */ 
//
// <BOUCLE breves>
//
function BOUCLE_breveshtml_51616a13298fe626f17edc1e33a0e04d(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$old_lang = $GLOBALS['spip_lang'];

	// REQUETE
	$result = spip_abstract_select(
		array("breves.date_heure",
		"breves.id_breve",
		"breves.titre",
		"breves.lang"), # SELECT
		array("spip_breves AS breves"), # FROM
		array("(breves.id_rubrique = '" . addslashes($Pile[$SP]['id_secteur']) . "')",
		"breves.statut='publie'"), # WHERE
		'', # GROUP
		array('breves.date_heure' . ' DESC'), # ORDER
		'0,15', # LIMIT
		'', # sous
		'', # HAVING
		'breves', # table
		'_breves', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_breve'][$Pile[$SP]['id_breve']] = 1; // invalideurs
		if (!$GLOBALS['forcer_lang'])
	 		$GLOBALS['spip_lang'] = ($x = $Pile[$SP]['lang']) ? $x : $old_lang;
		$t0 .= ('
		<li class="menu-item">
		<i>' .
affdate_court(vider_date($Pile[$SP]['date_heure'])) .
'</i>:
		<a href="' .
htmlspecialchars(vider_url(generer_url_breve($Pile[$SP]['id_breve']))) .
'">' .
interdire_scripts(typo($Pile[$SP]['titre'])) .
'</a>
		</li>
	');
	}

	$GLOBALS['spip_lang'] = $old_lang;
	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE syndication>
//
function BOUCLE_siteshtml_51616a13298fe626f17edc1e33a0e04d(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	// REQUETE
	$result = spip_abstract_select(
		array("syndic.url_site",
		"syndic.nom_site",
		"syndic.id_syndic"), # SELECT
		array("spip_syndic AS syndic"), # FROM
		array("(syndic.id_secteur = '" . addslashes($Pile[$SP]['id_secteur']) . "')",
		"syndic.statut='publie'"), # WHERE
		'', # GROUP
		array('syndic.nom_site'), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'syndic', # table
		'_sites', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_syndic'][$Pile[$SP]['id_syndic']] = 1; // invalideurs

		$t0 .= ('
		<li class="menu-item">
		<a href="' .
interdire_scripts(htmlspecialchars(vider_url($Pile[$SP]['url_site']))) .
'">' .
interdire_scripts(typo($Pile[$SP]['nom_site'])) .
'</a>
		</li>
	');
	}

	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE articles>
//
function BOUCLE_articles_racinehtml_51616a13298fe626f17edc1e33a0e04d(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$old_lang = $GLOBALS['spip_lang'];

	// REQUETE
	$result = spip_abstract_select(
		array("articles.id_article",
		"articles.titre",
		"articles.lang"), # SELECT
		array("spip_articles AS articles"), # FROM
		array("(articles.id_rubrique = '" . addslashes($Pile[$SP]['id_rubrique']) . "')",
		"articles.statut='publie'"), # WHERE
		'', # GROUP
		array('articles.titre'), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'articles', # table
		'_articles_racine', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_article'][$Pile[$SP]['id_article']] = 1; // invalideurs
		if (!$GLOBALS['forcer_lang'])
	 		$GLOBALS['spip_lang'] = ($x = $Pile[$SP]['lang']) ? $x : $old_lang;
		$t0 .= ('
<li class="plan-article"><a href="' .
htmlspecialchars(vider_url(generer_url_article($Pile[$SP]['id_article']))) .
'">' .
interdire_scripts(typo($Pile[$SP]['titre'])) .
'</a></li>
');
	}

	$GLOBALS['spip_lang'] = $old_lang;
	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE articles>
//
function BOUCLE_articleshtml_51616a13298fe626f17edc1e33a0e04d(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$old_lang = $GLOBALS['spip_lang'];

	// REQUETE
	$result = spip_abstract_select(
		array("articles.id_article",
		"articles.titre",
		"articles.lang"), # SELECT
		array("spip_articles AS articles"), # FROM
		array("(articles.id_rubrique = '" . addslashes($Pile[$SP]['id_rubrique']) . "')",
		"articles.statut='publie'"), # WHERE
		'', # GROUP
		array('articles.titre'), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'articles', # table
		'_articles', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_article'][$Pile[$SP]['id_article']] = 1; // invalideurs
		if (!$GLOBALS['forcer_lang'])
	 		$GLOBALS['spip_lang'] = ($x = $Pile[$SP]['lang']) ? $x : $old_lang;
		$t0 .= ('
	<li class="plan-article"><a href="' .
htmlspecialchars(vider_url(generer_url_article($Pile[$SP]['id_article']))) .
'">' .
interdire_scripts(typo($Pile[$SP]['titre'])) .
'</a></li>
	');
	}

	$GLOBALS['spip_lang'] = $old_lang;
	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE boucle>
//
function BOUCLE_sous_rubriqueshtml_51616a13298fe626f17edc1e33a0e04d(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$t0 = (($t1 = BOUCLE_rubriqueshtml_51616a13298fe626f17edc1e33a0e04d($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			('

<ul class="plan-rubriques">

' . $t1 . '

</ul>
') :
			(''));
	return $t0;
}


//
// <BOUCLE rubriques>
//
function BOUCLE_rubriqueshtml_51616a13298fe626f17edc1e33a0e04d(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$old_lang = $GLOBALS['spip_lang'];

	// REQUETE
	$result = spip_abstract_select(
		array("rubriques.id_rubrique",
		"rubriques.titre",
		"rubriques.lang"), # SELECT
		array("spip_rubriques AS rubriques"), # FROM
		array("(rubriques.id_parent = '" . addslashes($Pile[$SP]['id_rubrique']) . "')",
		"rubriques.statut='publie'"), # WHERE
		'', # GROUP
		array('rubriques.titre'), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'rubriques', # table
		'_rubriques', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_rubrique'][$Pile[$SP]['id_rubrique']] = 1; // invalideurs
		if (!$GLOBALS['forcer_lang'])
	 		$GLOBALS['spip_lang'] = ($x = $Pile[$SP]['lang']) ? $x : $old_lang;
		$t0 .= ('
<li>
<div class="plan-rubrique"><a href="' .
htmlspecialchars(vider_url(generer_url_rubrique($Pile[$SP]['id_rubrique']))) .
'">' .
interdire_scripts(typo($Pile[$SP]['titre'])) .
'</a></div>

	' .
(($t1 = BOUCLE_articleshtml_51616a13298fe626f17edc1e33a0e04d($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			('
	<ul class="plan-articles">
	' . $t1 . '
	</ul>
	') :
			('')) .
'

	' .
BOUCLE_sous_rubriqueshtml_51616a13298fe626f17edc1e33a0e04d($Cache, $Pile, $doublons, $Numrows, $SP) .
'

</li>
');
	}

	$GLOBALS['spip_lang'] = $old_lang;
	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE rubriques>
//
function BOUCLE_secteurshtml_51616a13298fe626f17edc1e33a0e04d(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$old_lang = $GLOBALS['spip_lang'];

	// REQUETE
	$result = spip_abstract_select(
		array("rubriques.id_secteur",
		"rubriques.id_rubrique",
		"rubriques.titre",
		"rubriques.lang"), # SELECT
		array("spip_rubriques AS rubriques"), # FROM
		array("rubriques.id_parent='0'",
		"rubriques.statut='publie'"), # WHERE
		'', # GROUP
		array('rubriques.titre'), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'rubriques', # table
		'_secteurs', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_rubrique'][$Pile[$SP]['id_rubrique']] = 1; // invalideurs
		if (!$GLOBALS['forcer_lang'])
	 		$GLOBALS['spip_lang'] = ($x = $Pile[$SP]['lang']) ? $x : $old_lang;
		$t0 .= ('

<div class="plan-secteur">

	' .
affiche_logos(calcule_logo('RUBRIQUE', 'ON', $Pile[$SP]['id_rubrique'],sql_parent($Pile[$SP]['id_rubrique']),  '0'), '', 'left') .
'<h1><a href="' .
htmlspecialchars(vider_url(generer_url_rubrique($Pile[$SP]['id_rubrique']))) .
'">' .
interdire_scripts(typo($Pile[$SP]['titre'])) .
'</a></h1>

	<div class="encart">

	<!-- Breves -->

	<h2 class="structure">' .
_T('public/spip/ecrire:breves') .
'</h2>

	' .
(($t1 = BOUCLE_breveshtml_51616a13298fe626f17edc1e33a0e04d($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			(('
	<div class="menu">
	<div class="breves">
		<div class="menu-titre">
		' .
_T('public/spip/ecrire:breves') .
'
		</div>
		<ul>
	') . $t1 . '
		</ul>
	</div>
	</div>
	') :
			('')) .
'

	<!-- Sur le Web -->

	<h2 class="structure">' .
_T('public/spip/ecrire:sites_web') .
'</h2>

	' .
(($t1 = BOUCLE_siteshtml_51616a13298fe626f17edc1e33a0e04d($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			(('
	<div class="menu">
	<div class="divers">
		<div class="menu-titre">
		' .
_T('public/spip/ecrire:sur_web') .
'
		</div>
		<ul>
	') . $t1 . '
		</ul>
	</div>
	</div>
	') :
			('')) .
'

	</div>

<!-- Articles et sous-rubriques -->

<h2 class="structure">' .
_T('public/spip/ecrire:articles') .
'</h2>

' .
(($t1 = BOUCLE_articles_racinehtml_51616a13298fe626f17edc1e33a0e04d($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			('
<ul class="plan-articles">

' . $t1 . '

</ul>
') :
			('')) .
'

' .
(($t1 = BOUCLE_rubriqueshtml_51616a13298fe626f17edc1e33a0e04d($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			('

<ul class="plan-rubriques">

' . $t1 . '

</ul>
') :
			('')) .
'


</div>

');
	}

	$GLOBALS['spip_lang'] = $old_lang;
	@spip_abstract_free($result,'');
	return $t0;
}



//
// Fonction principale du squelette dist/plan.html
//
function html_51616a13298fe626f17edc1e33a0e04d ($Cache, $Pile, $doublons=array(), $Numrows='', $SP=0) {
$t0 = ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="' .
lang_dir(($Pile[0]['lang'] ? $Pile[0]['lang'] : $GLOBALS['spip_lang']),'ltr','rtl') .
'" lang="' .
htmlentities($Pile[0]['lang'] ? $Pile[0]['lang'] : $GLOBALS['spip_lang']) .
'">
<head>
<title>[' .
interdire_scripts(typo(lire_meta('nom_site'))) .
']</title>
<meta http-equiv="Content-Type" content="text/html; charset=' .
interdire_scripts(lire_meta('charset')) .
'" />

<!-- Ceci est la feuille de style par defaut pour les types internes a SPIP -->
<link rel="stylesheet" href="spip_style.css" type="text/css" />

<!-- Les feuilles de style specifiques aux presents squelettes -->
<link rel="stylesheet" href="' .
interdire_scripts('dist') .
'/typographie.css" type="text/css" />

<!-- media="..." permet de ne pas utiliser ce style sous Netscape 4 (sinon plantage) -->
<link rel="stylesheet" href="' .
interdire_scripts('dist') .
'/habillage.css" type="text/css" media="print, projection, screen, tv" />
</head>

<body>


<!-- Plan du site -->

<div id="plan" class="contenu">

' .
BOUCLE_secteurshtml_51616a13298fe626f17edc1e33a0e04d($Cache, $Pile, $doublons, $Numrows, $SP) .
'

</div>

</body>
</html>
');

	return array(
		'texte' => $t0,
		'squelette' => 'html_51616a13298fe626f17edc1e33a0e04d',
		'process_ins' => ((strpos($t0,'<'.'?')=== false) ? 'html' : 'php'),
		'invalideurs' => $Cache
	);
}

?>